package atom.core3.redis;

import java.util.HashSet;

import atom.core0.util.StringUtil;
import redis.clients.jedis.JedisSentinelPool;

public class JedisSentinelPoolManager {
	private static JedisSentinelPool jedisPool = null;
	public static JedisSentinelPool getJedisSentinelPool()
	{
		return jedisPool;
	}
	public static void initJedisSentinels(String masterName, HashSet<String> ipport, String password) {

		if (StringUtil.isEmpty(password))
			jedisPool = new JedisSentinelPool(masterName, ipport);
		else
			jedisPool = new JedisSentinelPool(masterName, ipport, password);
	}	
	public static void setJedisSentinelPool(JedisSentinelPool pool)
	{
		jedisPool=pool;
	}
}
